package com.example.administrator.newsmvp.main.presenter;


import com.example.administrator.newsmvp.R;
import com.example.administrator.newsmvp.main.MainView;

public class MainPresenter {
    private MainView mMainView;

    public MainPresenter(MainView mainView) {
        this.mMainView = mainView;
    }

    public void switchFragment(int itemId) {
        switch (itemId) {
            case R.id.navigation_item_news:
                mMainView.toNewFragment();
                break;
            case R.id.navigation_item_images:
                mMainView.toImageFragment();
                break;
            case R.id.navigation_item_weather:
                mMainView.toWeatherFragment();
                break;
            case R.id.navigation_item_about:
                mMainView.toAboutFragment();
                break;
        }
    }
}
